package com.ruoyi.project.chopping.service.impl;

import java.util.List;

import com.ruoyi.project.chopping.domain.BasChopping;
import com.ruoyi.project.chopping.mapper.BasChoppingMapper;
import com.ruoyi.project.chopping.service.IBasChoppingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.ruoyi.common.core.text.Convert;

/**
 * choppingService业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-08
 */
@Service
public class BasChoppingServiceImpl implements IBasChoppingService
{
    @Autowired
    private BasChoppingMapper basChoppingMapper;

    /**
     * 查询chopping
     * 
     * @param stackingId chopping主键
     * @return chopping
     */
    @Override
    public BasChopping selectBasChoppingByStackingId(String stackingId)
    {
        return basChoppingMapper.selectBasChoppingByStackingId(stackingId);
    }

    /**
     * 查询chopping列表
     * 
     * @param basChopping chopping
     * @return chopping
     */
    @Override
    public List<BasChopping> selectBasChoppingList(BasChopping basChopping)
    {
        return basChoppingMapper.selectBasChoppingList(basChopping);
    }

    /**
     * 新增chopping
     * 
     * @param basChopping chopping
     * @return 结果
     */
    @Override
    public int insertBasChopping(BasChopping basChopping)
    {
        return basChoppingMapper.insertBasChopping(basChopping);
    }

    /**
     * 修改chopping
     * 
     * @param basChopping chopping
     * @return 结果
     */
    @Override
    public int updateBasChopping(BasChopping basChopping)
    {
        return basChoppingMapper.updateBasChopping(basChopping);
    }

    /**
     * 批量删除chopping
     * 
     * @param stackingIds 需要删除的chopping主键
     * @return 结果
     */
    @Override
    public int deleteBasChoppingByStackingIds(String stackingIds)
    {
        return basChoppingMapper.deleteBasChoppingByStackingIds(Convert.toStrArray(stackingIds));
    }

    /**
     * 删除chopping信息
     * 
     * @param stackingId chopping主键
     * @return 结果
     */
    @Override
    public int deleteBasChoppingByStackingId(String stackingId)
    {
        return basChoppingMapper.deleteBasChoppingByStackingId(stackingId);
    }
}
